package il.ac.braude.sona.gui.forms.myforms;

import il.ac.braude.sona.constants.ButtonPermission;
import il.ac.braude.sona.constants.Resources;
import il.ac.braude.sona.constants.Statuses;
import il.ac.braude.sona.gui.forms.FormFrame;
import il.ac.braude.sona.gui.forms.FormPanel;
import il.ac.braude.sona.gui.forms.questions.QComboBox;


/**
 * The EstimateTimeLineForm creates the GUI for estimating timeline to stage
 *
 * @author Ofek Ron
 * @author Avihay Avitan
 * @author Nitzan Inbar
 * @author Sasha Rozenthal
*/
public class EstimateTimeLineForm extends FormFrame {
	/**
	 * the id of the relevant request
	 */
	private String reqid;
	/**
	 * the stage to estimate time for
	 */
	private String stage;
	/**
	 * combobox contains numbers only from 1 to 99
	 */
	private QComboBox EstimateTime= new QComboBox("Choose evaluated days:",1,99);

	/**
	 * Creates the estimate time line form
	 * @param reqid  - the id of the relevant request
	 * @param stage  - the stage to estimate time for
	 */
	public EstimateTimeLineForm(String reqid,String stage) {
		super(ButtonPermission.EstimateTimeLine, Resources.Strings.Submit);
		FormPanel form = new FormPanel();
		setReqid(reqid);
		setStage(stage);
		if (stage.equals(Statuses.Estimate_Timeline_Surveying))
		form.addTitleWithUnderline("Estimate time for stage 'Surveying' at request: "+reqid);
		if (stage.equals(Statuses.Estimate_Timeline_Execution))
		form.addTitleWithUnderline("Estimate time for stage 'Execution' at request: "+reqid);
		form.addQuestion(EstimateTime);
		setFormPanel(form);
	}
	/**
	 * Returns the reqid
	 * @return reqid
	 */
	public String getReqid() {
		return reqid;
	}
	/**
	 * Sets the reqid
	 * @param reqid - the reqid to set
	 */
	public void setReqid(String reqid) {
		this.reqid = reqid;
	}
	/**
	 * Returns the stage
	 * @return stage
	 */
	public String getStage() {
		return stage;
	}
	/**
	 * Sets the stage
	 * @param stage - the stage to estimate time for
	 */
	public void setStage(String stage) {
		this.stage = stage;
	}
	
	

}
